<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>HTML DOM</title>
	<script>
		function checkedItem(){
			//1.获取对象
			var checkboxEle = document.getElementById('checkbox');
			//2.设置属性
			//选中
			checkboxEle.checked = true;
			//禁用
			checkboxEle.disabled = true;
		}
	</script>
</head>
<body>
	<p><input type="checkbox" id="checkbox"></p>
	<p><input type="button" value="单击我,让复选框选中" onclick="checkedItem()"></p>
</body>
</html>